google sheets get sheet name

45

var sheet = SpreadsheetApp.getActive().getSheetByName('YourSheetNameHere')
<?php

$sheets = array();

// ... load library and set up client ...
$service = new Google_Service_Sheets($client);

$response = $service->spreadsheets->get($spreadsheetId);
foreach($response->getSheets() as $s) {
    $sheets[] = $s['properties']['title'];
}

return $sheets;

?>

Comments

Submit
0 Comments